import * as Cesium from 'cesium/Cesium'
import Measurement from "./Measurement";
import HorizontalMeasurementDrawing from "./HorizontalMeasurementDrawing";
function getIcon(e) {
    return '<svg viewBox="0 0 30 30" height="' + e + 'px" width="' + e + 'px">\n                 <g transform="translate(0,-267)">\n                   <path d="m 5.5492003,281.78808 18.9375757,0.0497"/>\n                   <circle r="2.0788691" cy="281.63776" cx="3.0514872"/>\n                   <circle r="2.0788691" cy="281.71384" cx="26.985731"/>\n                 </g>\n               </svg>'
}
function HorizontalMeasurement(e) {
    e = Cesium.defaultValue(e, Cesium.defaultValue.EMPTY_OBJECT),
        Measurement.call(this, e),
        this._drawing = new HorizontalMeasurementDrawing(e)
}
HorizontalMeasurement.prototype = Object.create(Measurement.prototype),
    HorizontalMeasurement.prototype.constructor = HorizontalMeasurement,
    Cesium.defineProperties(HorizontalMeasurement.prototype, {
        distance: {
            get: function() {
                return this._drawing.distance
            }
        },
        icon: {
            value: getIcon(15)
        },
        thumbnail: {
            value: getIcon(25)
        },
        type: {
            value: "水平距离"
        },
        instructions: {
            value: ["单击点云或地球仪设置起点","移动鼠标以拖动直线","按此shift键以钳制直线方向","再次单击以设置终点","若要进行新的测量，请单击以清除以前的测量"]
        },
        id: {
            value: "horizontalMeasurement"
        }
    }),
    HorizontalMeasurement.prototype.handleDoubleClick = function() {
        this._drawing.handleDoubleClick()
    }
    ,
    HorizontalMeasurement.prototype.handleClick = function(e) {
        this._drawing.handleClick(e)
    }
    ,
    HorizontalMeasurement.prototype.handleMouseMove = function(e, t) {
        this._drawing.handleMouseMove(e, t)
    }
    ,
    HorizontalMeasurement.prototype.reset = function() {
        this._drawing.reset()
    }
    ,
    HorizontalMeasurement.prototype.isDestroyed = function() {
        return !1
    }
    ,
    HorizontalMeasurement.prototype.destroy = function() {
        return this._drawing.destroy(),
            Cesium.destroyObject(this)
    }
    export default HorizontalMeasurement;